library(sf)
library(tidyverse)

#3Dマップ作成のため
library(rayshader)

1997年の地図

1997年,2007年,2022年の地図

空間内挿による地価の可視化では,補論で空間内挿後の3年分のデータを結合した.その地図を立体化.

#複数地図→1枚の地図
map75856<-
  ggplot()+geom_sf(data=Toyama_75856,
                 aes(fill=pred), color=NA)+
  scale_fill_viridis_c(option="G", direction=-1)+
  coord_sf(xlim=c(136.96, 137.4), ylim=c(36.5, 36.78),
           datum=NA)+
  facet_wrap(~year, ncol=2)+
  labs(fill="万円/㎡")+
  theme_bw()

#3Dマップの作成
plot_gg(map75856, multicore=TRUE, 
        width=5, height=5, scale=250, 
        windowsize=c(1400,866), zoom=0.5, 
        phi=25, theta=30)

#可視化
rgl::rglwidget()

Rによる地理空間データの可視化